#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>

void print(long n)
{
	if(n>9)
	print(n / 10);
	printf("%d ", n % 10);
}

int main()
{
	long n = 0;
	while (scanf("%d", &n) != EOF)
	{
		print(n);
	}
	return 0;
}